[mirrors]
https://github.com/adventuregamestudio/ags/releases/download/v.3.3.5.4/ags_linux_v.3.3.5.4.tar.xz

[vars]
filesize=840440
sha512=a19392afe88552df03258a23b48ef70bc8ae67a7797456697eceb32fefa2d466947a04240d933d9b487887b1b22222df2dfdab6112d83440ad4c54b685ddd729
desc='adventure game studio engine to play several hundreds of free ags games'

[mirrors]

[deps]
freetype
allegro4
dumb
libtheora
libstdc++

[build]
mkdir -p bin
printf "#!/bin/sh\necho -lalleg -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib\n" > bin/allegro-config
chmod +x bin/allegro-config
export PATH="$PWD/bin:$PATH"

cd Engine
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
make V=1 -j$MAKE_THREADS
install -Dm 755 ags "$butch_install_dir"$butch_prefix/bin/ags
